# include <bits/stdc++.h>
using namespace std;
int main(){
	freopen("detect.in","r",stdin);
	freopen("detect.out","w",stdout);
	int a,b,c,d,e,z;
	cin>>a;
	cin>>a>>b>>c>>d;
	z=a;
	for(int i=1;i<=z;i++){
		cin>>a>>b>>c>>d;
	}
	cin>>a>>b>>c>>d>>e;
	cout<<3<<' '<<3<<endl;
	return 0;
}
